from django.conf.urls import url

from apps.users import views

urlpatterns = [

    url(r'^register/$', views.RegisterView.as_view(), name="register"),  # 注册的路由配置
    url(r'^usernames/(?P<username>[a-zA-Z0-9_]{5,20})/count/$', views.UsernameCountView.as_view(), name='count'),
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view(), name='count_mobile'),
    url(r'^login/$', views.LoginView.as_view(), name="login"),  # 登录的路由配置
    url(r'^logout/$', views.LogoutView.as_view(), name="logout"),  # 退出登录的路由配置
    url(r'^usercenter/$', views.UserCenterView.as_view(), name="usercenter"),  # 用户中心的路由配置
    url(r'^emails/$', views.EmailsView.as_view(), name="emails"),  # 邮箱的路由配置
    url(r'^address/$', views.AddressView.as_view(), name="address"),  # 收货地址的路由配置
]
